package com.lichongbing.lyoggl.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lichongbing.lyoggl.model.TimeLine;
import com.lichongbing.lyoggl.service.TimeLineService;
import com.lichongbing.lyoggl.mapper.TimeLineMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 */
@Service
public class TimeLineServiceImpl extends ServiceImpl<TimeLineMapper, TimeLine>
    implements TimeLineService{
    @Autowired
    private TimeLineMapper timeLineMapper;
    @Override
    public TimeLine findByCurent() {
        return timeLineMapper.findByCurent();
    }
    @Override
    public int insert(TimeLine timeline) {
        String id = timeline.getId();
        String name = timeline.getName();
        String start = timeline.getStart();
        String descriptions = timeline.getDescriptions();
        String tags = timeline.getTags();
        return timeLineMapper.inserts(id,name, start, descriptions,tags);
    }
    @Override
    public String addtime(TimeLine timeline,String oldoutid) {
        String id = timeline.getId();
        String name = timeline.getName();
        String start = timeline.getStart();
        String descriptions = timeline.getDescriptions();
        String tags = timeline.getTags();
       return timeLineMapper.addtime(id,oldoutid,name, start, descriptions,tags);
    }
}




